function p = marginal_posterior_probability(d, G)

% function p = marginal_posterior_probability(data, parameter matrix)
%
% returns the Marginal posterior probability

[matrix_length, matrix_width] = size(G);

numerator = (d'*d - d'*G*((G'*G)^-1)*G'*d)^(-(matrix_length - matrix_width)/4);
denominator = sqrt(det(G'*G));

p = numerator / denominator;